<!DOCTYPE html>
<html>
<head>
  <meta charset='utf-8' />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  <title><%= content_for?(:title) ? yield(:title) : Setting.app_name %></title>
  <meta name="apple-mobile-web-app-capable" content="no">
  <meta content='True' name='HandheldFriendly' />
  <%= stylesheet_link_tag "front" %>
  <%= javascript_include_tag "app" %>
  <%= csrf_meta_tag %>
  <%= raw Setting.custom_head_html %>
</head>
<body data-controller-name="<%= controller_name %>">
  <div class="header">
    <div class="header navbar navbar-expand flex-md-row bd-navbar">
      <div class="container d-sm-flex flex-wrap">
        <div class="navbar-header d-none d-md-flex" id="navbar-header" data-turbolinks-permanent>
          <%= raw Setting.navbar_brand_html %>
        </div>

        <div class="navbar-nav-scroll">
          <%= render "shared/navbar" %>
        </div>
        <div class="ml-auto d-md-flex">
          <%= render "shared/usernav" %>
        </div>
      </div>
    </nav>
  </div>

  <div id="main" class="main-container container">
    <%= notice_message %>
    <%= yield %>
  </div>

  <footer class="footer">
    <div class="container">
      <%= raw Setting.footer_html %>
    </div>
  </footer>

  <script type="text/javascript" data-turbolinks-eval="false">
    App.root_url = "<%= root_url %>";
    App.asset_url = "<%= Setting.upload_url -%>";
    <% if current_user %>
      App.current_user_id = <%= current_user.id %>;
    <% end %>
  </script>
  <%= yield :scripts %>
</body>
</html>
